atspi: Fix a thinko in action filtering
authorMatthias Clasen <mclasen@redhat.com>
Fri, 16 Oct 2020 01:28:11 +0000 (21:28 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 16 Oct 2020 01:31:58 +0000 (21:31 -0400)
get_action_at_index() was trying hard to find out
which actions are valid, only to then return the
invalid ones anyway.

gtk/a11y/gtkatspiaction.c

index c33361e7cc19dee5e6161b59fdfd26839e8bb155..bcb74d594aeb53bf4122f3b34b66fdc79e70a223 100644 (file)
@@ -639,12 +639,12 @@ get_action_at_index (GtkActionMuxer  *muxer,
         continue;
 
       if (real_pos == pos)
-        break;
+        return actions[i];
 
       real_pos += 1;
     }
 
-  return actions[real_pos];
+  return NULL;
 }
 
 static int